#!/bin/sh
#
# 简单写一下脚本的功能。
#
#
#

if [ $# -lt 1 ]; then
	echo "Usage: $0 num."
	exit
fi

allfiles=""

for arg in "$@"
do


	allfiles=$allfiles" "`ls *"$arg"_*.md |head -1 `

done


echo $allfiles |xargs subl